package com.pomelo.kill.model;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

@Data
public class Order implements Serializable {

    private String id;

    /**
    * 商品编号
    */
    private Integer gid;
    private Goods goods;

    /**
    * 用户编号
    */
    private Integer uid;
    private Userinfo userinfo;

    /**
    * 地址编号
    */
    private Integer addressId;
    private Address address;

    /**
    * 创建时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date createDate;

    /**
    * 支付时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    private Date payTime;

    private BigDecimal payMoney;

    /**
    * 订单状态，0 未付款，1 已付款 2 订单失效
    */
    private Integer state;

    @Serial
    private static final long serialVersionUID = 1L;
}